Attenuated total reflection based measurement of refractive index and carbon dioxide concentration

ABSTRACT

Systems and methods presented herein generally relate to a tool for determining a refractive index of a formation fluid using attenuated total reflection. The tool includes a body having a fluid admitting assembly and a flow line that receives the formation fluid. The tool also includes two different crystals having faces in contact with fluid in the flow line. The tool further includes at least one light source coupled to the crystals and configured to direct light into the crystals. In addition, the wavelength, the refractive indices, and the angles of incidence are configured such that the light undergoes total internal reflection at interfaces between the crystals and the formation fluid. The tool also includes at least one light detector coupled to the crystals and configured to measure reflected light exiting the crystals. The tool further includes at least one processor coupled to the at least one light detector.

CROSS REFERENCE TO RELATED APPLICATIONS

The present application claims priority benefit of U.S. Provisional Application No. 63/269,882 filed Mar. 24, 2022, the entirety of which is incorporated by reference herein and should be considered part of this specification.

BACKGROUND

The present disclosure generally relates to a tool for determining a refractive index and concentration of carbon dioxide of a formation fluid using attenuated total reflection.

This section is intended to introduce the reader to various aspects of art that may be related to various aspects of the present techniques, which are described and/or claimed below. This discussion is believed to be helpful in providing the reader with background information to facilitate a better understanding of the various aspects of the present disclosure. Accordingly, it should be understood that these statements are to be read in this light, and not as an admission of any kind.

Measurement of composition based on attenuated total reflection requires refractive index of the fluid. Since the index itself is a function of the composition, independent refractive index data is necessary to infer composition, particularly that of dissolved carbon dioxide. Conversely, the index can be correlated to a range of physical properties of interest (e.g., density, composition and polarizability), and a self-consistency check between composition and refractive index may be carried out. Consistency improves measurement confidence.

Previous methods for inferring refractive index include measuring attenuated total reflection using either two different crystal materials cut with the same truncated-cone geometry, or the same material with differing cone angle of the frustrum, or both. Such methods assume a fixed crystal material refractive index over the wavelengths of measurement, and that the refractive index of the fluid is non-dispersive or invariant to the wavelength of the probing electromagnetic beam. Therefore, any wavelength dependent variation in refractive index in the crystal or the fluid introduces an error in the estimated composition of the fluid. It is desirable to remove this error by, for example, inferring the variation of the refractive index of the fluid with respect to the wavelength, and accounting for such variation in estimating fluid composition.

SUMMARY

A summary of certain embodiments described herein is set forth below. It should be understood that these aspects are presented merely to provide the reader with a brief summary of these certain embodiments and that these aspects are not intended to limit the scope of this disclosure.

Certain embodiments of the present disclosure include a tool for determining a refractive index of a formation fluid. The tool includes a body having a fluid admitting assembly and a flow line that receives the formation fluid. The tool also includes two different crystals having faces in contact with fluid in the flow line. The crystals have at least one of different refractive indices and different angles of incidence. The tool further includes at least one light source coupled to the crystals and configured to direct light into the crystals. The light has at least one wavelength. In addition, the wavelength, the refractive indices, and the angles of incidence are configured such that the light undergoes total internal reflection at interfaces between the crystals and the formation fluid. The tool also includes at least one light detector coupled to the crystals and configured to measure reflected light exiting the crystals. The tool further includes at least one processor coupled to the at least one light detector. The at least one processor is configured to continuously and iteratively, in substantially real-time, determine attenuations of the light entering the crystals, and determine the refractive index of the formation fluid and a carbon dioxide concentration in the formation fluid utilizing the attenuations to account for variations in the refractive index of the formation fluid.

Certain embodiments of the present disclosure also include a method for determining a refractive index of a formation fluid. The method includes placing into a borehole a tool having a fluid admitting assembly, a flow line, two different crystals in contact with the formation fluid in the flow line, at least one light source, at least one light detector and associated signal processing circuitry, and at least one processor. The crystals have at least one of different refractive indices and different angles of incidence. The method also includes moving the fluid admitting assembly of the tool into contact with a formation at a location of interest in the formation. The method further includes causing formation fluid to flow into the flow line of the tool and into contact with the crystals. In addition, the method includes directing light from the at least one light source into the crystals. The method also includes detecting with the at least one light detector the light exiting the crystals. The crystals and the at least one light source are configured such that the light will undergo total internal reflection at interfaces between the crystals and the formation fluid. The method further includes using the associated signal processing circuitry to compare the exiting light to a reference light value for the at least one light source associated with the at least one detector in order to obtain attenuation values. In addition, the method includes using the at least one processor to continuously and iteratively, in substantially real-time, determine attenuations of the light entering the crystals, determine the refractive index of the formation fluid, and determine a carbon dioxide concentration in the formation fluid utilizing the attenuations to account for variations in the refractive index of the formation fluid at measurement wavelengths and reference wavelengths.

Certain embodiments of the present disclosure also include tool for determining a refractive index of a formation fluid. The tool includes two different crystals having faces in contact with fluid in a flow line. The crystals have at least one of different refractive indices and different angles of incidence. The tool also includes at least one light source coupled to the crystals and configured to direct light into the crystals. The tool further includes at least one light detector coupled to the crystals and configured to measure reflected light exiting the crystals. In addition, the tool includes at least one processor coupled to the at least one light detector, wherein the at least one processor is configured to continuously and iteratively, in substantially real-time, determine attenuations of the light entering the crystals, and determine the refractive index of the formation fluid and a carbon dioxide concentration in the formation fluid utilizing the attenuations to account for variations in the refractive index of the formation fluid.

Various refinements of the features noted above may be undertaken in relation to various aspects of the present disclosure. Further features may also be incorporated in these various aspects as well. These refinements and additional features may exist individually or in any combination. For instance, various features discussed below in relation to one or more of the illustrated embodiments may be incorporated into any of the above-described aspects of the present disclosure alone or in any combination. The brief summary presented above is intended to familiarize the reader with certain aspects and contexts of embodiments of the present disclosure without limitation to the claimed subject matter.

BRIEF DESCRIPTION OF THE DRAWINGS

Various aspects of this disclosure may be better understood upon reading the following detailed description and upon reference to the drawings, in which:

FIG. 1 is a schematic diagram of a downhole apparatus for determining the refractive index of a formation fluid, in accordance with embodiments of the present disclosure;

FIG. 2 is a partial block, partial schematic diagram of elements of the downhole apparatus of FIG. 1 , in accordance with embodiments of the present disclosure;

FIGS. 3 a and 3 b are schematic diagrams showing crystals arranged relative to a flow line, in accordance with embodiments of the present disclosure;

FIGS. 4-8 are plots of a double normalized function for the effective path length for diamond and sapphire, in accordance with embodiments of the present disclosure;

FIG. 9 is a plot of a crystal correction coefficient with respect to sapphire, in accordance with embodiments of the present disclosure;

FIG. 10 is a plot of the refractive index of sapphire, in accordance with embodiments of the present disclosure;

FIGS. 11 and 12 are plots of a function of the refractive index of sapphire versus square of wavelength, in accordance with embodiments of the present disclosure;

FIG. 13 is a plot of the refractive index of diamond near linear dependence with respect to reciprocal of square of wavelength and negligible temperature dependence, in accordance with embodiments of the present disclosure;

FIG. 14 is a plot of the minimum and maximum carbon dioxide pressures required for attenuation to be in range for E c calibration, in accordance with embodiments of the present disclosure;

FIG. 15 is a plot of the solubility of carbon dioxide in water, in accordance with embodiments of the present disclosure;

FIG. 16 is another plot of the minimum and maximum carbon dioxide pressures required for attenuation to be in range for E c calibration, in accordance with embodiments of the present disclosure; and

FIG. 17 is a flow diagram of a method for determining a refractive index of a formation fluid, in accordance with embodiments of the present disclosure.

DETAILED DESCRIPTION

One or more specific embodiments of the present disclosure will be described below. These described embodiments are only examples of the presently disclosed techniques. Additionally, in an effort to provide a concise description of these embodiments, all features of an actual implementation may not be described in the specification. It should be appreciated that in the development of any such actual implementation, as in any engineering or design project, numerous implementation-specific decisions must be made to achieve the developers' specific goals, such as compliance with system-related and business-related constraints, which may vary from one implementation to another. Moreover, it should be appreciated that such a development effort might be complex and time consuming, but would nevertheless be a routine undertaking of design, fabrication, and manufacture for those of ordinary skill having the benefit of this disclosure.

When introducing elements of various embodiments of the present disclosure, the articles “a,” “an,” and “the” are intended to mean that there are one or more of the elements. The terms “comprising,” “including,” and “having” are intended to be inclusive and mean that there may be additional elements other than the listed elements. Additionally, it should be understood that references to “one embodiment” or “an embodiment” of the present disclosure are not intended to be interpreted as excluding the existence of additional embodiments that also incorporate the recited features.

As used herein, the terms “connect,” “connection,” “connected,” “in connection with,” and “connecting” are used to mean “in direct connection with” or “in connection with via one or more elements”; and the term “set” is used to mean “one element” or “more than one element.” Further, the terms “couple,” “coupling,” “coupled,” “coupled together,” and “coupled with” are used to mean “directly coupled together” or “coupled together via one or more elements.”

In addition, as used herein, the terms “real time”, “real-time”, or “substantially real time” may be used interchangeably and are intended to describe operations (e.g., computing operations) that are performed without any human-perceivable interruption between operations. For example, as used herein, data relating to the systems described herein may be collected, transmitted, and/or used in control computations in “substantially real time” such that data readings, data transfers, and/or data processing steps occur once every second, once every 0.1 second, once every 0.01 second, or even more frequently, during operations of the systems (e.g., while the systems are operating). In addition, as used herein, the terms “continuous”, “continuously”, or “continually” are intended to describe operations that are performed without any significant interruption. For example, as used herein, control commands may be transmitted to certain equipment every five minutes, every minute, every 30 seconds, every 15 seconds, every 10 seconds, every 5 seconds, or even more often, such that operating parameters of the equipment may be adjusted without any significant interruption to the closed-loop control of the equipment. In addition, as used herein, the terms “automatic”, “automated”, “autonomous”, and so forth, are intended to describe operations that are performed are caused to be performed, for example, by a computing system (i.e., solely by the computing system, without human intervention).

As described above, previous methods for inferring refractive index assumed a fixed crystal material refractive index over the wavelengths of measurement, and that the refractive index of the fluid was non-dispersive or invariant to the wavelength of the probing electromagnetic beam. As such, any wavelength dependent variation in refractive index in the crystal or the fluid introduces an error in the estimated composition of the fluid.

The embodiments described herein include variation of refractive index of the crystal with respect to wavelength. Within the band of measurement, the embodiments described herein allow the refractive index of the fluid be different at each of the probing wavelengths. Total internal reflection is assumed to occur. Therefore, the embodiments described herein have the potential to improve accuracy of not only the refractive index measurement, but also of the inference of dissolved gas (usually carbon dioxide (CO₂)) fraction. Hydrocarbon solvents for illustrative purposes are broken into light and heavy, although a greater number of components may be chosen, depending on the availability of more reference wavelengths. The refractive index dispersion characteristics may be inferred, depending on the number of frequencies or wavelengths deployed.

To provide context, during both injection and production of oil and gas operations, reservoir fluids are monitored. In enhanced oil recovery (EOR) processes, compositional measurements of fluid phases are useful for quantitative evaluation of displacement induced migration. Specifically, data relating to fluid characterization in different producing zones may be used to infer reservoir structure, optimize zonal production strategies, quantify hydrocarbon quality, and facilitate recycling of injected gases, such as CO₂.

To measure concentrations, one approach is to withdraw fluid samples from the reservoir using a formation testing probe or packed-off intervals. In certain embodiments, sensors may be used within the flow line to measure transmission at infra-red (IR) wavelengths. The spectral characteristics of the transmitted beam are indicative of various components within the fluid, each chemical component having its own absorption coefficient. In addition, density and viscosity may also be used to ensure consistent component fractions.

As described in greater detail herein, attenuated total reflection (ATR) measurement at mid-IR frequencies may be used to measure dissolved components (e.g., CO₂ within a liquid). These methods rely on the attenuation of a reflected wave due to a small penetration (e.g., usually a fraction of a wavelength) of the incident beam's evanescent wave, the penetration depth being dependent on the refractive indices of the fluid and the crystalline material, such as sapphire or diamond or zirconia, in contact with it. The incident angle of the beam at the crystal-fluid interface, and therefore the geometry, also affects the effective penetration depth. The crystal is transparent to incident and reflected infra-red electromagnetic wave and has a refractive index sufficiently larger than the fluid to enable total reflection.

In the absence of any information, a nominal refractive index for the fluid may be assumed. Such assumption is acceptable when the solute concentrations are relatively low and the refractive index is determined by the solvent. However, for relatively high solute concentrations, such assumption may lead to inaccuracies if the fluid's index varies with the concentration of the dissolved components. In certain embodiments, such limitations may be overcome by collecting two attenuation measurements with differing crystal geometries, or differing materials, or both, and inferring η_(f), the fluid refractive index. In such embodiments, it may be assumed that η_(f) as well as η_(κ), the crystal's refractive index, are constant over the span of the measurement wavelength.

However, real fluids and materials used for ATR measurements may show a level of dispersion that should not be entirely ignored if accurate determinations of η_(f) are necessary to estimate effective penetration length and fluid composition. Besides geometry, the penetration distance of the evanescent wave is dependent on η_(f) and η_(κ), and, therefore, their variability with respect to wavelength.

The embodiments described herein continuously measure the refractive index of the fluid in order to correct for the change in the penetration depth in substantially real-time, while accounting for variations of η_(κ) and η_(f) with respect to wavelength λ. Since a direct measurement for refractive index is utilized in conjunction with the ATR, temperature adjustment for penetration distance is avoided. In addition, the embodiments described herein also avoid infrared background correction. The embodiments described herein may be implemented as a plug-in to current formation testers.

FIG. 1 illustrates a downhole apparatus 10 for determining the refractive index of a formation fluid. As illustrated, in certain embodiments, the downhole apparatus or tool 10 may be suspended in a borehole 12 traversing a formation 14 by a cable 16 that is spooled in a usual fashion on a suitable winch (not shown) on the formation surface. On the surface, the cable 16 may be electrically coupled to a surface control system 18. The downhole tool 10 includes an elongated body 20 that encloses a tool control system 22. In certain embodiments, the elongated body 20 also includes a selectively extendable fluid admitting assembly 24 and a selectively extendable tool anchoring member 26, which are respectively arranged on opposite sides of the body 20. In certain embodiments, the fluid admitting assembly 24 is configured to selectively seal off or isolate selected portions of the wall of the borehole 12 such that pressure or fluid communication with the adjacent formation 14 is established. In addition, in certain embodiments, the downhole tool 10 includes a fluid analysis module 28 with a flow line 30 through which fluid collected from the formation 14 flows. The fluid may thereafter be expelled through a port (not shown) or may be directed to one or more fluid collecting chambers 32, 34, which may receive and retain the fluids collected from the formation 14. As described in greater detail herein, the fluid admitting assembly 24, the fluid analysis module 28, and the flow path to the fluid collecting chambers 32, 34 may be controlled by the control systems 18, 22.

In certain embodiments, at least two sample chambers 36 may be placed in communication with the flow line 30 as described with respect to FIGS. 3 a and 3 b. Each sample chamber 36 may be configured as illustrated in FIG. 2 . In particular, each sample chamber 36 may be bounded by a cover 38 and an exterior surface 40 of an optically dense crystal 42. The flow line 30 provides for supply of a fluid sample 44 into the sample chamber 36 such that liquid fluid (i.e., of the fluid sample 44) is in direct contact with the exterior surface 40 of the crystal 42. An infrared (IR) light source 46 generates a beam of IR radiation 48 that is directed into the crystal 42 such that it is incident on the interface of the crystal 42 and the liquid fluid of the fluid sample 44 at an angle larger than the critical angle θ_(c), which is a function of the refractive

indices of both the fluid sample 44 and the crystal 42 and is given by

${\theta_{c} = {\sin^{- 1}\frac{\eta_{f}}{\eta_{\kappa}}}},$

where η_(κ) is the refractive index of the crystal 42 and η_(f) is the refractive index of the fluid sample 44. The internal reflection of the beam 48 can occur multiple times along the interface of the crystal 42 and the fluid sample 44. The crystal 42 may be a high refractive index material, such as sapphire or diamond, in order to minimize the critical angle θ_(c).

In the regions of the IR spectrum where the fluid sample 44 absorbs energy, the evanescent wave at those wavelengths will be attenuated. The crystal 42 directs the reflected beam 50 (e.g., including the attenuated energy from each evanescent wave) for supply to an IR detector 52. As described in greater detail herein, in certain embodiments, signal processing circuitry 54 (e.g., amplifier and filter circuitry, A/D conversion circuitry, and so forth) processes the output of the IR detector 52 to measure and process the output of the IR detector 52, thereby measuring the intensity of the detected light within the predetermined IR measurement bands as a function of time, and generating digital data corresponding to such measurements. In certain embodiments, one or more predetermined IR measurement bands include a predetermined absorption band centered around 4.27 micrometers (μm) (e.g., 4.27 μtm±75 nanometers (nm)), a predetermined reference band centered around 2.5 μm (e.g., 2.5 μm±75 nm), and a reference band centered around 3.5 μm (e.g., 3.5 μm±75 nm). The reference wavelengths are chosen to distinguish solvent components such that no absorption of the desired dissolved component occurs at the reference wavelength.

In certain embodiments, the reflected beam 50 (e.g., including the attenuated evanescent waves) may be guided by a lens 56 through an optical filter 58 to the IR detector 52. The optical filter 58 may provide bandpass optical filtering for the predetermined infrared measurement (and reference) bands. In certain embodiments, the IR detector 52 may include an array of IR detector elements corresponding to the predetermined infrared measurement bands. Alternatively, in other embodiments, a single IR detector element may be used.

In certain embodiments, additional supporting electronics may be used in conjunction with the IR light sources 46 and IR detectors 52. In certain embodiments, the supporting electronics may be provided for each IR light source 46 and each IR detector 52 or may be shared by the IR light sources 46 and by the IR detectors 52. As illustrated in FIG. 2 , in certain embodiments, such supporting electronics may include a data communication interface 60, IR source driver circuitry 62, control circuity 64, and power circuitry 66. In certain embodiments, the data communications interface 60 may be electrically coupled to the signal processing circuitry 54 and may operate to communicate digital data generated by the signal processing circuitry 54 (e.g., which represents the intensity of the detected light within the predetermined IR measurement band(s) as a function of time) to an external data processor 68.

In certain embodiments, the data processor 68 may process the digital data as described in greater detail herein in order to determine the refractive index of the fluid sample 44. In certain embodiments, the IR source driver circuitry 62 may generate electrical signals for the IR light source 46 in order to operate the IR light source 46 as desired. In addition, in certain embodiments, the data processor 68 may send control signals (e.g., via the communications interface 60) to the control systems 18, 22 illustrated in FIG. 1 to cause the control systems 18, 22 to control certain surface and/or downhole equipment based at least in part on data processing performed by the data processor 68, which will be described in greater detail herein.

In certain embodiments, the control circuitry 64 may control operation of the electrical, optoelectrical and/or optical elements of the downhole tool 10 illustrated in FIG. 1 in accordance with commands communicated from the external data processor 68 to the control circuitry 64 via the communications interface 60. For example, in certain embodiments, the control circuitry 64 may interface to the IR source driver circuitry 62 to activate and control the operational mode of the IR light source 46 via commands issued by the external data processor 68 and communicated thereto via the communications interface 60. In addition, the control circuitry 64 may carry out other control operations as desired. In certain embodiments, the power circuitry 66 may receive power supply signals from an external power supply 70 and transform and/or condition these signals into a form suitable for supply to the electrical and optoelectrical elements of the downhole tool 10. In certain embodiments, the operation of the power circuitry 66 may include AC-DC conversion functions, DC-DC conversion functions, voltage regulation functions, current limiting functions, and other power conditioning functions.

Turning now to FIG. 3 a, in certain embodiments, two different crystals 42, 42 b may be disposed adjacent each other and along a flow line 30. In certain embodiments, the different crystals 42 a, 42 b may have different geometries. By way of example only, a first crystal 42 a is a sapphire ATR crystal having faces (e.g., exterior surfaces) that angle at 75° from the horizontal, whereas a second crystal 42 b is a sapphire ATR crystal having faces that angle at 65° from the horizontal. When the crystals 42 a, 42 b are in contact with formation fluids (e.g., the fluid sample 44 described with respect to FIG. 2 ), both crystals 42 a, 42 b are expected to have total internal reflection. In the configuration illustrated in FIG. 3 a, the crystals 42 a, 42 b are arranged such that fluid flowing through the flow line 30 (e.g., the direction indicated by the arrow) will be first in contact with the first crystal 42 a and then in contact with the second crystal 42 b. Assuming that the fluid is generally homogeneous, measurements may be collected simultaneously. On the other hand, if it is assumed that the fluid is not homogeneous, the measurements may be made sequentially when it is expected that the same fluid is adjacent to the respective crystals 42 a, 42 b.

FIG. 3 b illustrates another embodiment having two different crystals 42 c, 42 d. The crystals 42 c, 42 d are illustrated as facing each other on opposite sides of the flow line 30. In certain embodiments, the crystals 42 c, 42 d may have different geometries. By way of example only, a first crystal 42 c is a sapphire ATR crystal having faces (e.g., exterior surfaces) that angle at 75° from the horizontal, whereas a second crystal 42 d is a sapphire ATR crystal having faces that angle at 65° from the horizontal. Because the crystals 42 c, 42 d are disposed opposite each other with the fluid from the flow line 30 passing therebetween, measurements involving the crystals 42 c, 42 d may be made simultaneously. It is also to be understood that the two crystals 42 c, 42 d may be placed such that the flat faces of the crystals 42 c, 42 d facing the fluid of the two crystals 42 c, 42 d may be placed at the same axial location but at right angles to each other, or any other suitable angle.

In other embodiments, the different crystals (e.g., either the crystals 42 a, 42 b illustrated in FIG. 3 a or the crystals 42 c, 42 d illustrated in FIG. 3 b ) may have substantially identical geometries (e.g., angles of incidence), but may be made from different materials (i.e., the crystals may have different refractive indices). By way of example only, one crystal may be a sapphire crystal and the other crystal may be a diamond crystal. In yet other embodiments, both the materials and the angles of incidence (e.g., geometries) of the different crystals may be different. In certain embodiments, the geometry of each material may be optimized in order to maximize sensitivity to η_(f). Within an expected range of η_(f), the configuration may be tailored so that the difference in the attenuation between the two crystals is maximized for the same wavelength A and number of reflections N_(R).

Conventional refractometers have been used to estimate the refractive index of crude oil in a surface laboratory at a specified wavelength. Unfortunately, sampled reservoir fluids may be contaminated by drilling-mud filtrate. The accuracy of the estimated refractive indices is dependent on both sample withdrawal techniques and the extent to which reservoir conditions are replicated in surface laboratories. It is known that contaminants introduced or removed during the fluid transfer process from downhole to laboratory may introduce a significant bias in the estimates of refractive index. It is logistically difficult and expensive to routinely bring reconstituted representative samples to the laboratory for analysis.

Another challenge arises due to the variability of refractive index with temperature, fluid composition, and pressure. For example, significant variation in the refractive index of glycerin and paraffin oil has been observed at relatively high pressures. In addition, refractive index of other fluids varies with dissolved species, and this dependence is roughly given by the Lorentz-Lorenz relationship. Also, variation of refractive index with dissolved CO₂ in hydrocarbon systems is inevitable, and has indeed been the basis of mapping CO₂ concentrations within a liquid.

For completeness, a brief review of commonly used refractometers for crude oil in surface labs is provided here:

-   -   The Abbe refractometer is based on total internal reflection of         the incident beam at the interface of the sample and the         measuring prism. The sample and prism are placed in direct         contact. The measurement relies on inferring the critical angle         of total reflection (θ_(c)). This is the incident angle for         which the refracted ray travels along the boundary between the         two media. In this refractometer, a source irradiates light from         a wide range of incident angles onto a prism. For an incident         angle, θ_(i)<θ_(c) the light is partly refracted and reflected.         On the other hand, for θ_(f)>θ_(c), the light is totally         reflected. A sensor array measures the reflected light         intensity, and monitors the transition of partly reflected to         totally reflected light for estimating the critical θ_(c). The         refractive index of fluid is then obtained from Snell's law.     -   The Interferometric refractometer is based on the principle of         interference. It uses interferometry to measure the difference         in light velocity in different media. This measurement principle         is best suited for solids or thin films. In recent years, this         technology has been modified for liquid samples.     -   Other bench-top devices such as the Pulfrich refractometer and         Immersion refractometer are well-known devices for measuring         refractive index. Both are critical angle refractometers with         variations in implementation of the principle of total internal         reflection. Like the Abbe refractometer, these technologies are         robust and precise for conducting measurements in laboratory         environments. For example, a Peltier device is routinely used to         avoid temperature variations between the sample and the sensing         prism. These refractometers are not well suited for conducting         downhole measurements and fluid analysis.

The refractive index, η, is the reciprocal of the ratio of the phase velocity (v) in the medium to the speed of light in vacuum (c):

$\begin{matrix} {{\eta = \frac{c}{v}},} & (1) \end{matrix}$

Light travels slower in other media relative to vacuum because of electromagnetic field interactions with the charged particles of the medium. Refractive index and the speed of light in a medium are dependent both on temperature and pressure. Various relationships have been proposed to capture the dependence between refractive index and mass density. For example, in miscible systems, the Gladstone-Dale equation is:

$\begin{matrix} {{\frac{\eta - 1}{\rho} = {\sum\limits_{i = 1}^{N}{w_{i}\eta_{Mi}}}},} & (2) \end{matrix}$

where ρ is the mass density of the medium and η_(Mi) is the molar refractivity of the i^(th) component. Mass fraction of the component i is w_(i). Another well-known relationship is the Lorentz-Lorenz equation:

$\begin{matrix} {{\frac{\eta^{2} - 1}{\eta^{2} + 2} = {\left( \frac{N_{A}\alpha}{3M} \right)\rho}},} & (3) \end{matrix}$

where α denotes the molecular polarizability of the medium, N_(A) is the Avogadro's number, and M is the molecular weight of the medium. The polarizability is the coefficient of proportionality between the dipole moment and the electric field.

Measurements of refractive index may be combined with one or more of the aforementioned formulae and others to obtain consistent physical properties of interest, including mass density, composition of crude oil, viscosity etc. within a restricted series of materials. These estimates are useful for reservoir modeling.

In many other ways, the measurement of refractive index is quite important. For example, in certain embodiments, dissolved CO₂ concentration may be measured using the attenuation of a reflected signal at mid-IR wavelengths. This method, however, requires refractive index of the liquid within which the CO₂ concentration needs to be obtained. Unlike aqueous solutions, in many instances (e.g., hydrocarbon solvent), the dissolved amount of CO₂ is sufficiently large that it changes the refractive index of the phase under examination. Then, the dissolved fraction may not be obtained directly. It is for this reason that the two-crystal configuration described with respect to FIGS. 3 a and 3 b may be used to infer η_(f) for subsequent determination of dissolved CO₂.

The embodiments described herein present a new measurement principle that uses a combination of two or more attenuated total reflectance (ATR) sensors to measure the refractive index of fluid (η_(f)) downhole at the measurement wavelengths including that of the reference. We also take into account the variation of η_(κ) (e.g., refractive index of crystal, κ, is a generic indicator for crystal and may refer to sapphire, diamond, zirconia, and so forth) with respect to wavelength, since multiple wavelengths are used in such a measurement. A reference wavelength, λ_(r) at which there is no attenuation by the dissolved component (e.g., here CO₂) whose fraction is desired is necessary, and is different from the dissolved component absorption wavelength λ_(m). Depending on the nature of the solvent, we may need more than one reference wavelength. In CO₂ enhanced oil recovery, at a minimum, crude oil is divided into light and heavy components. The embodiments described herein illustrate the principle by having two reference wavelengths λ_(r) and λ_(R), although the number of reference wavelengths may be more and is at least equal to the number of components assumed to constitute the solvent. The values of η_(κ) and η_(f) at wavelengths λ_(r), λ_(R), and λ_(m) are not the same, and variation with respect to λ is consequential for determining penetration lengths over which absorption and scattering cause attenuation. Since the penetration length depends on the refractive index ratios at each of the wavelengths, attenuation is a function of not only the (natural log) molar attenuation coefficient ∈_(i) of species i and its molar concentration C_(i), but also the refractive index ratios (which in turn may vary with C_(i)). Thus, in order to infer the concentration of species causing intensity reduction from the optical measurement, refractive index of the fluid at the said measurement wavelength may first be determined, with the molar attenuation coefficient known. Determination of these quantities for subsequent use for inferring dissolved component concentration is one of the purposes of the embodiments described herein. Certain embodiments of the present disclosure focus on the mid-infrared (m-IR) range; however, the techniques described herein are also extensible to a different range of wavelengths as long as the fundamental equations describing attenuation is rooted in Beer-Lambert' s law described below.

At this point, it may be useful to state notations for clarity. Molar concentration is C, and its subscript may be l, h, or c, referring to light and heavy components of solvent, and CO₂. Similarly, as stated before, are the (natural log) attenuation coefficients given by ∈_(i), i=l, h, or c. In our problem, concentrations are spatially uniform through the liquid over the path length,

. In a transmission experiment,

is readily identified. In attenuated total reflection, path length is obtained by solving the relevant electromagnetic equations of Maxwell, and an effective path length equivalent to a transmission experiment is identified. It is sufficient to know that the effective path length varies with the refractive indices of the fluid and the crystal, and that these may vary with wavelength, temperature, and pressure. The path length also changes with incident angle.

Beer-Lambert law with absorbance A_(e) written in terms of natural logs of ratio of intensity measured I to source intensity I₀ is:

$\begin{matrix} {{A_{e} = {{{- \ln}\frac{I}{I_{0}}} = {\sum\limits_{{i = l},h,c}{\epsilon_{i}C_{i}\ell}}}},} & (4) \end{matrix}$

For completeness, the traditional chemistry definition of absorbance in terms of logs will be discussed. Here, absorbance A is given as:

$\begin{matrix} {{A = {{{- \log}\frac{I}{I_{0}}} = {\sum\limits_{{i = l},h,c}{\varepsilon_{i}C_{i}\ell}}}},} & (5) \end{matrix}$

or ε_(i)=(1/ln 10)∈_(i). The embodiments described herein may utilize either of these. Unless otherwise stated, ∈_(i) will be used herein to refer to molar attenuation coefficients.

As used herein, non-hatted notation implies a value, and accented parameters imply functions. Since a main concern described herein is wavelength and concentration dependence of refractive indices, temperature and pressure (T and P) are generally assumed to be fixed. The variation with respect to T and P is addressed in the calibration section below. Also, ∈_(i) are only species dependent, and are independent of C_(i). At a reference wavelength λ_(r), it may be noted that:

$\begin{matrix} {\eta_{fr} = {{\hat{\eta}}_{f}\left( {C,\lambda_{r}} \right)}} & (6) \end{matrix}$ $\begin{matrix} {\eta_{\kappa r} = {{{\hat{\eta}}_{\kappa}\left( \lambda_{r} \right)}.}} & (7) \end{matrix}$

Note that C={C_(l), C_(h), C_(c)}. As per the assumption discussed above, C_(c) has no or minimal influence on attenuation at wavelength λ_(r) and λ_(R). Similar to λ_(r), at λ_(R):

$\begin{matrix} {\eta_{fR} = {{\hat{\eta}}_{f}\left( {C,\lambda_{R}} \right)}} & (8) \end{matrix}$ $\begin{matrix} {\eta_{\kappa R} = {{{\hat{\eta}}_{\kappa}\left( \lambda_{R} \right)}.}} & (9) \end{matrix}$

Adsorption due to species CO₂ occurs at measurement wavelength λ_(m). At this wavelength:

$\begin{matrix} {\eta_{fm} = {{\hat{\eta}}_{f}\left( {C,\lambda_{m}} \right)}} & (10) \end{matrix}$ $\begin{matrix} {\eta_{\kappa m} = {{{\hat{\eta}}_{\kappa}\left( \lambda_{m} \right)}.}} & (11) \end{matrix}$

For molar attenuation coefficient, along the lines of notations of refractive indices, with subscripts denoting the component and the wavelength:

$\begin{matrix} {\epsilon_{lr} = {{\hat{\epsilon}}_{l}\left( \lambda_{r} \right)}} & (12) \end{matrix}$ $\begin{matrix} {\epsilon_{hr} = {{\hat{\epsilon}}_{h}\left( \lambda_{r} \right)}} & (13) \end{matrix}$ $\begin{matrix} {\epsilon_{cr} = {{\hat{\epsilon}}_{c}\left( \lambda_{r} \right)}} & (14) \end{matrix}$ $\begin{matrix} {\epsilon_{lR} = {{\hat{\epsilon}}_{l}\left( \lambda_{R} \right)}} & (15) \end{matrix}$ $\begin{matrix} {\epsilon_{hR} = {{\hat{\epsilon}}_{h}\left( \lambda_{R} \right)}} & (16) \end{matrix}$ $\begin{matrix} {\epsilon_{cR} = {{\hat{\epsilon}}_{c}\left( \lambda_{R} \right)}} & (17) \end{matrix}$ $\begin{matrix} {\epsilon_{lm} = {{\hat{\epsilon}}_{l}\left( \lambda_{m} \right)}} & (18) \end{matrix}$ $\begin{matrix} {\epsilon_{hm} = {{\hat{\epsilon}}_{h}\left( \lambda_{m} \right)}} & (19) \end{matrix}$ $\begin{matrix} {\epsilon_{cm} = {{\hat{\epsilon}}_{c}\left( \lambda_{m} \right)}} & (20) \end{matrix}$

As in the case of refractive indices, it is to be understood that the above quantities will vary with temperature and pressure, although in liquid state, pressure dependence is expected to be relatively weak.

At the wavelengths λ_(r), λ_(R), and λ_(m), the source (e.g., incident) intensities are I_(0r), I_(0R), and I_(0m). The totally reflected beam is attenuated as per the dictates of Beer-Lambert law, and these measured intensities at the corresponding wavelengths, at I_(r), I_(R), and I_(m). If we let β represent the wavelength subscripts r, R, and m, an expression applicable for all wavelengths of interest and within the applicability of Beer-Lambert law is:

$\begin{matrix} {A_{e\beta} = {{\ln\frac{I_{\beta}}{I_{0\beta}}} = {{\sum\limits_{{i = l},h,c}{\epsilon_{i\beta}C_{i}{\hat{\ell}\left( {\eta_{f\beta},\eta_{\kappa\beta},\theta} \right)}}} = {{\sum\limits_{{i = l},h,c}{\epsilon_{i\beta}C_{i}{{\hat{\ell}}_{\kappa\beta}\left( {C,\theta} \right)}}} = {\epsilon_{i\beta}C_{i}{{{\hat{\ell}}_{\kappa\beta\theta}(C)}.}}}}}} & (21) \end{matrix}$

where we note that

?_(?) : C → ℓ ?indicates text missing or illegible when filed

through η_(f) η_(κ), and the path length variation with respect to wavelength and incident angle are captured in the subscripts and β and θ. The subscript κ for referring to crystal takes on a value that varies with the material, for example, d for diamond, s for sapphire, or ξ for zirconia. To distinguish the crystals, notations κ₁ for crystal 1, κ₂ for crystal 2, and so on if there are more than two crystals, may be used.

Source Calibration

The intensity I_(0β) is fixed by the source temperature T₀. Even if the fluid chamber is evacuated, so that there is no absorption, the measured optical intensity would not show the expected variation with respect to T₀ and would not be identical from one sensor to the next. This variation from the expected Planck's black body spectral radiance of (h and k are the Planck's and Boltzmann constants):

$\begin{matrix} {{I_{0}(\lambda)} = {\frac{2{hc}^{2}}{\lambda^{5}\left( {{e\text{?}} - 1} \right)}.}} & (22) \end{matrix}$ ?indicates text missing or illegible when filed

may be due to a number of factors including filter and detector variability, and may be remedied by setting suitable gains in the measurement system. Since the sensor should have an adequate span over the expected range of data, calibration in vacuum would lead to saturating the measurement. Therefore, a suitable liquid whose ∈_(i) is known at various temperatures of the liquid and whose refractive index is in the middle of the expected range is ideal.

For source intensity gain and intensity tuning called normalization, consider the sensor crystal 42 exposed to the known fluid sample 44. As per the dictates of Eq. 22, the expected source intensity at λ_(R) and λ_(m) for a source temperature fixed at T₀ may be written as:

$\begin{matrix} {\frac{I_{0R}}{I_{0r}} = {f\left( {T_{0},\lambda_{r},\lambda_{R}} \right)}} & (23) \end{matrix}$ $\begin{matrix} {\frac{I_{0m}}{I_{0r}} = {f\left( {T_{0},\lambda_{r},\lambda_{m}} \right)}} & (24) \end{matrix}$

Obviously, f(T₀; λ_(r); λ_(r))=1. The molar attenuation coefficient of the normalization fluid may be denoted with a subscript z. Then, for the normalization fluid, the ATR response for a sensor with N_(R) total internal reflections is:

$\begin{matrix} {\frac{I_{zr}}{I_{0r}} = {e\text{?}}} & (25) \end{matrix}$ $\begin{matrix} {\frac{I_{zR}}{I_{0r}} = {e\text{?}}} & (26) \end{matrix}$ $\begin{matrix} {\frac{I_{zm}}{I_{0r}} = {e\text{?}}} & (27) \end{matrix}$ ?indicates text missing or illegible when filed

Now, since the refractive index of the crystal 42 and the normalization fluid are known, the effective path length is known (see further below). Thus, the right hand side of the above equations may be computed. Since I_(zr) is measured, Eq. 25 leads to:

I_(0r) = I_(zr)e? ?indicates text missing or illegible when filed

From the measured I_(0r), I_(zr), and I_(zm), and Eqs. 23-27, the gains may be set so that:

$\begin{matrix} {I_{zR} = {{f\left( {T_{0},\lambda_{r},\lambda_{R}} \right)}I_{zr}e\text{?}}} & (28) \end{matrix}$ $\begin{matrix} {I_{zm} = {{f\left( {T_{0},\lambda_{r},\lambda_{m}} \right)}I_{zr}e{\text{?}.}}} & (29) \end{matrix}$ ?indicates text missing or illegible when filed

If the above responses are satisfied through appropriate gain adjustment, then the ratios of Eq. 23 and 24 are met for all sensors, and it may be assumed that these relationships hold post-normalization.

Penetration Depth

The ATR technology is based on measuring the change in the intensity of a totally internally reflected infrared beam when it passes through the interface of the sensor (i.e., crystal 42) and the fluid sample 44. This is given in terms of the attenuation of the reflected beam intensity when compared to the incident beam. The implementation of ATR technology should satisfy two necessary conditions for total internal reflection. These are that:

-   -   The refractive index of the crystal 42 be greater than that of         the fluid sample 44 at all wavelengths over the measurement         range.     -   The incident angle of the beam be larger than the critical angle         at the crystal-sample interface.

The amplitude of the internally reflected wave at the crystal-sample interface is affected because the evanescent wave formed while undergoing total internal reflection penetrates the fluid sample 44 adjacent to the interface, and exponentially decays with the distance from the crystal-sample interface. The penetration depth is that distance over which the evanescent wave's intensity decays according to what would have occurred in transmission, and is approximately:

$\begin{matrix} {d_{p} = {\frac{\lambda}{2\pi\hat{\eta}\text{?}(\lambda)\sqrt{{\sin^{2}\theta} - \left\lbrack {\hat{\eta}\text{?}\left( {C,\lambda} \right)/\hat{\eta}\text{?}(\lambda)} \right\rbrack^{2}}}.}} & (30) \end{matrix}$ ?indicates text missing or illegible when filed

In a strongly absorbing medium, the interaction between the probing light beam and the medium should be sufficiently small to ensure that measurements are not entirely attenuated. The correct depth or what is preferably termed as the effective path length is better quantified by considering perpendicular and parallel polarization and taking their mean value.

Since the path length of the evanescent wave is a fraction of a μm, ATR is a powerful technique for obtaining dissolved CO₂ in brine and crude oil downhole. The prerequisite is that the predominant species should be the molecular CO₂ and not a derivative species. If configured to have multiple reflections, the cumulative depth of penetration may be used to compute

, the optical path length of the sensor, approximately equal to N_(R)d_(e), where N_(R) is the number of reflections and d_(e) is the effective path length, and is set equal Kd_(p) as explained below.

It is assumed that the effective path length of the mid-IR is equal to Kd_(p), as described above. Parallel and perpendicular polarized waves undergo differing evanescent path lengths, and K computed as a result of both attenuations is the variable that corrects d_(p) to d_(e). Thus, the effective path length is:

$\begin{matrix} {{\ell = {{KN}_{R}d_{p}}},} & (31) \end{matrix}$

where K varies with η_(f), η_(κ), and θ. Variation of η_(f) or η_(κ) with respect to A implies that K changes with λ. For that matter, it varies with concentration vector C of the dissolved species also. This leads to:

$\begin{matrix} {K = {{\overset{\text{?}}{K}\left( {{{\overset{\text{?}}{\eta}}_{f}\left( {C,\lambda} \right)},{\hat{\eta}}_{\kappa},(\lambda),\theta} \right)} = {{\overset{\text{?}}{K}\left( {C,\lambda,\theta} \right)}.}}} & (32) \end{matrix}$ ?indicates text missing or illegible when filed

Again, the functional dependence is for a fixed temperature and pressure. N_(R) is the number of reflections that is determined by the design of the crystal-fluid interface. Note that for η_(κ),, the subscript κ is used to denote the material. For example, K may be d for diamond, s for sapphire, ξ for zirconia. For the fluid refractive index, a subscript s may be added to f in order to emphasize that the measurement is on a solution whose component is desired.

For intensities that are measured, the first subscript is denoted as s to indicate the solution whose dissolved component is desired to be estimated, whereas the second subscript refers to the wavelength. The third subscript refers to the crystal number. Each crystal number may have a different material of construction and/or a different θ.

With crystal one, the measured absorbance (in In scale) at λ_(r) is thus denoted A_(er1), and with crystal two, it is A_(er2). Then:

$\begin{matrix} {{A\text{?}} = {{{- \ln}\frac{I_{{sr}1}}{I_{0r}}} = {{\sum\limits_{{i = l},h,e}{\epsilon_{i}C_{i}\ell_{{sr}1}}} = {\sum\limits_{{i = l},h,}{\text{?}\epsilon_{i}C_{i}{\hat{\ell}\left( {{\eta\text{?}},{\eta\text{?}},\theta_{1}} \right)}}}}}} & (33) \end{matrix}$ $\begin{matrix} {A_{{er}2} = {{{- \ln}\frac{I_{{sr}2}}{I_{0r}}} = {{\sum\limits_{{i = l},h,e}{\epsilon_{i}C_{i}\ell_{{sr}2}}} = {\sum\limits_{{i = l},h,}{\text{?}\epsilon_{i}C_{i}{\hat{\ell}\left( {{\eta\text{?}},{\eta\text{?}},\theta_{1}} \right)}}}}}} & (34) \end{matrix}$ ?indicates text missing or illegible when filed

The ratio of absorbance of the two crystals 42 is:

$\begin{matrix} {\frac{A_{{er}1}}{A_{{er}2}} = {\frac{\hat{\ell}\left( {{\eta\text{?}},{\eta\text{?}},\theta_{1}} \right)}{\hat{\ell}\left( {{\eta\text{?}},{\eta\text{?}},\theta_{2}} \right)} = {\frac{N_{R}{{\hat{d}}_{e}\left( {{\eta\text{?}},{\eta\text{?}},\theta_{1}} \right)}}{N_{R}{{\hat{d}}_{e}\left( {{\eta\text{?}},{\eta\text{?}},\theta_{2}} \right)}} = {\frac{\frac{\frac{{\hat{d}}_{e}\left( {{\eta\text{?}},{\eta\text{?}},\theta_{1}} \right)}{{\hat{d}}_{p}\left( {{\eta\text{?}},{\eta\text{?}},\theta_{1}} \right)}}{{\hat{d}}_{e}\left( {{\eta\text{?}},{\eta\text{?}},\theta_{2}} \right)}}{{\hat{d}}_{p}\left( {{\eta\text{?}},{\eta\text{?}},\theta_{2}} \right)}{\frac{{\hat{d}}_{p}\left( {{\eta\text{?}},{\eta\text{?}},\theta_{1}} \right)}{\left. {{\hat{d}}_{p}\left( {{\eta\text{?}},{\eta\text{?}},\theta_{2}} \right)} \right)}.}}}}} & (35) \end{matrix}$ ?indicates text missing or illegible when filed

D is defined as:

$\begin{matrix} {D = {\frac{d_{e}}{d_{p}} = {{\hat{D}\left( {\eta_{f},\eta_{\kappa},\theta} \right)}.}}} & (36) \end{matrix}$

For practical purposes, then, D=K. Then:

$\begin{matrix} {\frac{A_{{er}1}}{A_{{er}2}} = {\frac{\hat{D}\left( {{\eta\text{?}},{\eta\text{?}},\theta_{1}} \right)}{\hat{D}\left( {{\eta\text{?}},{\eta\text{?}},\theta_{2}} \right)} = \frac{{\hat{d}}_{p}\left( {{\eta\text{?}},{\eta\text{?}},\theta_{1}} \right)}{d_{p}\left( {{\eta\text{?}},{\eta\text{?}},\theta_{2}} \right)}}} & (37) \end{matrix}$ ?indicates text missing or illegible when filed

The results may be normalized with respect to a reference. In certain embodiments, the functions {circumflex over (D)} at a η_(f)=η_(min)=1.3 are used as the reference, although 1.325 may be used as well. Accordingly:

$\begin{matrix} {D_{r10} = {{{\hat{D}}_{0}\left( {\eta_{\kappa_{1}r},\theta_{1}} \right)} = {\hat{D}\left( {\eta_{\kappa_{1}r},\eta_{\min},\theta_{1}} \right)}}} & (38) \end{matrix}$ $\begin{matrix} {D_{r20} = {{{\hat{D}}_{0}\left( {\eta_{\kappa_{2}r},\theta_{2}} \right)} = {\hat{D}\left( {\eta_{\kappa_{2}r},\eta_{\min},\theta_{2}} \right)}}} & (39) \end{matrix}$

Further normalization of D_(r10) nd D_(r20) may be carried out assuming a fixed refractive index for the fluid sample 44 and the crystal 42. The additional normalization construction of a function that varies only with the refractive index of the fluid sample 44, assumed independent of λ. However, the embodiments described herein are far more elaborate because of variability in refractive indices with respect to A in the material of the crystal 42 and the fluid sample 44. To this end, Eq. 37 may be rewritten as:

$\begin{matrix} {\frac{A_{{er}1}}{A_{{er}2}} = {\frac{D_{r10}}{D_{r20}}\frac{\hat{D}\left( {{\eta\text{?}},{\eta\text{?}},\theta_{1}} \right)}{D_{r10}}\frac{D_{r20}}{\hat{D}\left( {{\eta\text{?}},{\eta\text{?}},\theta_{1}} \right)}\frac{{\hat{d}}_{p}\left( {{\eta\text{?}},{\eta\text{?}},\theta_{1}} \right)}{{\hat{d}}_{p}\left( {{\eta\text{?}},{\eta\text{?}},\theta_{2}} \right)}}} & (40) \end{matrix}$ ?indicates text missing or illegible when filed

In addition:

$\begin{matrix} {{{\hat{D}}_{N}\left( {{\eta\text{?}},{\eta\text{?}},\theta_{1}} \right)}:=\frac{\hat{D}\left( {{\eta\text{?}},{\eta\text{?}},\theta_{1}} \right)}{D_{r10}}} & (41) \end{matrix}$ $\begin{matrix} {{{\hat{D}}_{N}\left( {{\eta\text{?}},{\eta\text{?}},\theta_{2}} \right)}:=\frac{\hat{D}\left( {{\eta\text{?}},{\eta\text{?}},\theta_{2}} \right)}{D_{r20}}} & (42) \end{matrix}$ ?indicates text missing or illegible when filed

Note that the denominator's numerical value for the crystal index is matched to that of the numerator. Also, note that by definition, the ratio D_(r10)=D_(r20) is independent of η_(f). A second normalization enables removal of the dependency on η_(κ) and θ. For this:

$\begin{matrix} {{{\hat{D}}_{NN}\left( {{\eta\text{?}},{\eta\text{?}},\theta} \right)} = {{{{{\hat{D}}_{N}\left( {{\eta\text{?}},{\eta\text{?}},\theta} \right)}\left\lbrack {1 + {{\hat{F}\left( \frac{\eta_{\kappa}}{\eta_{s}} \right)}\left( {\frac{\eta_{\kappa}}{\eta_{s}} - 1} \right)\left( \frac{\eta_{f} - \eta_{\min}}{\eta_{\max} - \eta_{\min}} \right)^{3/2}}} \right\rbrack} \approx {G\text{?}\left( {\eta_{f};\lambda} \right)}} = {G\text{?}\left( {\eta_{f};{\eta\text{?}}} \right)}}} & (43) \end{matrix}$ ?indicates text missing or illegible when filed

where F={circumflex over (F)}(η_(κ)/η_(s)) is a function of the ratio of the refractive indices of the crystal 42 to that of sapphire a λ, and η_(max) is the maximum value of η_(f) for the normalization, set equal to 1.475 in this illustration. The range of 1.3 of 1.475 for η_(f) covers most of fluids of interest. The function {tilde over (G)}(η_(f),λ) implies that for each λ, {circumflex over (D)}_(NN) may be sufficiently well represented by a function of η_(f). Essentially, the dependence on λ arises due to η_(s) variation with respect to λ and the second crystal's η variation has been removed through the normalization process. It is, therefore, more appropriate to represent this dependence through Ĝ(η_(f); η_(s)). This representation has an advantage that it reflects the more natural dependence, and the temperature variation is captured through η_(s).

Numerical evidence of the above conjecture is presented below in a separate section on universality. Henceforth, D_(NN)=Ĝ(η_(f), η_(z)) will be used (i.e., the approximation is replaced with an equality). The equation above was tested at 350 K for λ in the range 2.5-4.5 μm with diamond and sapphire crystal properties. However, since the effective path length depends only on refractive indices, and not the material itself, it is believed that the conjecture is valid for other crystal materials whose refractive index is between that of diamond and sapphire (e.g., zirconia). At λ_(r), η_(κ) is replaced with η_(κr) and η_(s) is with η_(sr), the refractive index of sapphire at the first reference wavelength.

The conjecture of Eq. 43 is important to processing of the measurements. It allows us to rewrite Eq. 40 in the form:

$\begin{matrix} {\frac{A_{{er}1}}{A_{{er}2}} = {\frac{D_{r10}}{D_{r20}}\frac{{\hat{D}}_{NN}\left( {{\eta\text{?}},{\eta\text{?}},\theta_{1}} \right)}{{\hat{D}}_{NN}\left( {{\eta\text{?}},{\eta\text{?}},\theta_{2}} \right)}\frac{1 + {{\hat{F}\left( \frac{\eta\text{?}}{\eta\text{?}} \right)}\left( {\frac{\eta\text{?}}{\eta\text{?}} - 1} \right)\left( \frac{{\eta\text{?}} - \eta_{\min}}{\eta_{\max} - \eta_{\min}} \right)^{3/2}}}{1 + {{\hat{F}\left( \frac{\eta\text{?}}{\eta\text{?}} \right)}\left( {\frac{\eta\text{?}}{\eta\text{?}} - 1} \right)\left( \frac{{\eta\text{?}} - \eta_{\min}}{\eta_{\max} - \eta_{\min}} \right)^{3/2}}}\frac{{\hat{d}}_{p}\left( {{\eta\text{?}},{\eta\text{?}},\theta_{1}} \right)}{{\hat{d}}_{p}\left( {{\eta\text{?}},{\eta\text{?}},\theta_{2}} \right)}}} & (44) \end{matrix}$ ?indicates text missing or illegible when filed

With the conjecture that {circumflex over (D)}_(NN)(η_(f), η_(κ), θ)=Ĝ(η_(f); η_(s)), the above equation simplifies to:

$\begin{matrix} {\frac{A_{{er}1}}{A_{{er}2}} = {\frac{D_{r10}}{D_{r20}}\frac{1 + {{\hat{F}\left( \frac{\eta\text{?}}{\eta\text{?}} \right)}\left( {\frac{\eta\text{?}}{\eta\text{?}} - 1} \right)\left( \frac{{\eta\text{?}} - \eta_{\min}}{\eta_{\max} - \eta_{\min}} \right)^{3/2}}}{1 + {{\hat{F}\left( \frac{\eta\text{?}}{\eta\text{?}} \right)}\left( {\frac{\eta\text{?}}{\eta\text{?}} - 1} \right)\left( \frac{{\eta\text{?}} - \eta_{\min}}{\eta_{\max} - \eta_{\min}} \right)^{3/2}}}\frac{{\hat{d}}_{p}\left( {{\eta\text{?}},{\eta\text{?}},\theta_{1}} \right)}{{\hat{d}}_{p}\left( {{\eta\text{?}},{\eta\text{?}},\theta_{2}} \right)}}} & (45) \end{matrix}$ ?indicates text missing or illegible when filed

Referring back to Eq. 30, Eq. 45 may be rewritten explicitly in terms of η_(f) _(s) _(r) as:

$\begin{matrix} {\frac{A_{{er}1}}{A_{{er}2}} = {\frac{D_{r10}}{D_{r20}}\frac{1 + {\hat{F}\text{?}}}{1 + {\hat{F}\text{?}}}{\text{?}.}}} & (46) \end{matrix}$ ?indicates text missing or illegible when filed

The left hand side of the above equation is the ratio of two absorbances and constitutes a measurement. On the right hand side, the first term is independent of η_(f) _(s) _(r), and it requires the geometry of the crystal 42, the crystal material and its refractive index at measurement conditions, all of which are known. The only unknowns in the second and third terms is η_(f) _(s) _(r)r; the functional description of {circumflex over (F)} is given in the section on universal description. Satisfying Eq. 46 provides the solution for η_(f) _(s) _(r).

The same procedure may be carried out for reference wavelength λ_(R). For this wavelength, Eq. 46 is modified to read:

$\begin{matrix} {\frac{A_{{eR}1}}{A_{{eR}2}} = {\frac{D_{R10}}{D_{R20}}\frac{1 + {\hat{F}\text{?}}}{1 + {\hat{F}\text{?}}}{\text{?}.}}} & (47) \end{matrix}$ ?indicates text missing or illegible when filed

Eq. 47 may be solved to obtain η_(f) _(s) _(R). The measurement wavelength for the dissolved component is λ_(m). Analogous to Eqs. 46 and 47:

$\begin{matrix} {\frac{A_{{em}1}}{A_{{em}2}} = {\frac{D_{m10}}{D_{m20}}\frac{1 + {\hat{F}\text{?}}}{1 + {\hat{F}\text{?}}}{\text{?}.}}} & (48) \end{matrix}$ ?indicates text missing or illegible when filed

Again, since the crystal refractive indices are known at λ_(m), solving Eq. 48 from the measured ratio of absorbance, η_(f) _(s) _(m) may be obtained.

Determination of η_(f) _(s) at other wavelengths may be carried out as long as it lies between η_(min) and η_(maxa), and suitable filters and detectors are present within the sensor to carry out the measurements. Wavelength dependency of η_(f) _(s) at the fluid's temperature may then be obtained.

Dual Sapphire Crystals

Rather than using two different crystal materials, in other embodiments, sapphire may be used for both crystals. The above results may be simplified for such a configuration. Eq. 46 becomes:

$\begin{matrix} {\frac{A_{{er}1}}{A_{{er}2}} = {\frac{D_{r10}}{D_{r20}}{\sqrt{\frac{{\eta_{sr}^{2}\sin^{2}\theta_{2}} - \text{?}}{{\eta_{sr}^{2}\sin^{2}\theta_{1}} - \text{?}}}.}}} & (49) \end{matrix}$ ?indicates text missing or illegible when filed

An explicit solution for the fluid refractive index at λ_(r) is:

$\begin{matrix} {\text{?} = {\eta_{sr}{\sqrt{\frac{{\sin^{2}\theta_{2}} - {\frac{A_{{er}1}^{2}}{A_{{er}2}^{2}}\frac{D_{r20}^{2}}{D_{r10}^{2}}\sin^{2}\theta_{1}}}{1 - {\frac{A_{{er}1}^{2}}{A_{{er}2}^{2}}\frac{D_{r20}^{2}}{D_{r10}^{2}}}}}.}}} & (50) \end{matrix}$ ?indicates text missing or illegible when filed

Analogous solutions at other wavelengths are:

$\begin{matrix} {{\text{?} = {\eta_{sR}\sqrt{\frac{{\sin^{2}\theta_{2}} - {\frac{A_{{eR}1}^{2}}{A_{{eR}2}^{2}}\frac{D_{R20}^{2}}{D_{R10}^{2}}\sin^{2}\theta_{1}}}{1 - {\frac{A_{{eR}1}^{2}}{A_{{eR}2}^{2}}\frac{D_{R20}^{2}}{D_{R10}^{2}}}}}}},} & (51) \end{matrix}$ $\begin{matrix} {\text{?} = {\eta_{sm}{\sqrt{\frac{{\sin^{2}\theta_{2}} - {\frac{A_{{em}1}^{2}}{A_{{em}2}^{2}}\frac{D_{m20}^{2}}{D_{m10}^{2}}\sin^{2}\theta_{1}}}{1 - {\frac{A_{{em}1}^{2}}{A_{{em}2}^{2}}\frac{D_{m20}^{2}}{D_{m10}^{2}}}}}.}}} & (52) \end{matrix}$ ?indicates text missing or illegible when filed

Identical Crystal Material

In certain embodiments, the two crystals 42 may be made of the same material (e.g., diamond or zirconia). When the crystal materials are the same, η_(κ) ₁ =η_(κ) ₂ at each wavelength. Although the ratio η_(κ)/η_(s) is not unity, the second term of Eqs. 46 to 48 is one. Therefore, Eqs. 50 to 52 may be used, with the appropriate η_(κβ) replacing η_(sβ) in the expressions. Eqs. 38 and 39 may be used for D_(r10) and D_(r20) with the appropriate refractive indices for the crystals 42.

Universality

Numerical evidence is now provided of the universality conjecture of Eq. 43 for D_(NN) to be expressible in terms of functions Ĝ or {tilde over (G)} (see FIGS. 4-9 ). A wavelength was first chosen, with a range of θ, and D_(NN) was computed. The value of F (given by the function {circumflex over (F)}) that makes the plot universal was also found. All of the plots are illustrated for diamond and sapphire at a temperature of 350 K, but note that this is inconsequential, because only refractive indices enter the calculation. FIG. 4 illustrates that for two materials of different refractive indices at 2.5 μm, the double normalized non-dimensional path length can be overlain. A similar overlap is seen at 3 μm (FIG. 5 ). Additional plots in steps of 0.5 μm for λ are shown in FIGS. 6-8 . The legend “Universal” curve is a quadratic least squares approximation for points using refractive indices of diamond and sapphire.

For each wavelength, the function {circumflex over (F)} takes on a different value, and this is best expressed as a function of η_(κ)/η_(s) since (i) sapphire is the reference and (ii) the ratio of

/d_(p) has explicit dependence on A removed. The function {circumflex over (F)} is irrelevant when the crystal 42 is also made of sapphire since the multiplicative factor η_(κ)/η_(s)−1 will make the product zero. In FIG. 9 , the variation of F with respect to η_(κ)/η_(s) is illustrated along with a least squares approximation. The small scatter of computed markers from the best-fit curve is due to the precision used in F, and has little material consequence.

Since F is known as a function of η_(κ)/η_(s), for a given λ and T, the argument of {circumflex over (F)} is known. The curve of FIG. 9 gives F. For the temperature of interest, ri, is known for the materials used at a given λ. Since D_(r10), D_(r20), D_(R10), D_(R20), D_(m10), and D_(m20) are functions only of η_(κ) at the wavelength of interest, and θ, all quantities on the right hand side of Eqs. 46-48 are known except for η_(f), which may thus be determined from the ratio of two measurements represented by the left hand side.

Dissolved Component Concentration

For the purpose of this section, it is assumed that calibration has been carried out, and that the value of ∈_(lr), ∈_(hr), ∈_(cr), ∈_(lR), ∈_(hR), ∈_(cR), ∈_(hm), and ∈_(cm) within the temperature and pressure ranges of interest is known. Thus, the functions in Eqs. 12-20 assume that temperature T and pressure P are parameters, not explicitly included. In other words, as an example, strictly, ∈_(lr)={circumflex over (∈)}_(lr)(λ_(r);T,P) where T and P have been dropped in Eq. 12.

In the section on calibration, it is illustrated how E∈_(l), ∈_(h), and ∈_(c) may be determined and, thus, infer their parametric dependence on T and P, and functional dependence on λ. By design (dropping the parametric dependence), {circumflex over (ϵ)}_(c)(λ_(r)) and {circumflex over (∈)}_(c)(λ_(R)) are nearly zero compared to solvent.

Now, at λ_(r) and λ_(R), four measurements from two crystals 42 (or 2N_(κ), for N_(κ) crystals 42) are known. However, one measurement at each wavelength is independent, since the other was needed for η_(f)at each wavelength. Since the crystal 42 with the smaller θ will have a larger d_(e), attenuation measurement from the small θ crystal 42 may be used. Letting θ₁<θ₂, from Eq. 21 while recognizing that the design calls for ∈_(cr), ∈_(CR)=0:

$\begin{matrix} {A_{\text{?}1} = {\left( {{\epsilon_{lr}C_{l}} + {\epsilon_{hr}C_{h}}} \right){\hat{\ell}\left( {\eta_{f_{\text{?}}r},\eta_{\text{?}_{1}r},\theta_{1}} \right)}}} & (53) \end{matrix}$ $\begin{matrix} {A_{\text{?}{R1}} = {\left( {{\epsilon_{lR}C_{l}} + {\epsilon_{hR}C_{h}}} \right){{\hat{\ell}\left( {\eta_{f_{\text{?}}R},\eta_{\text{?}_{1}R},\theta_{1}} \right)}.}}} & (54) \end{matrix}$ ?indicates text missing or illegible when filed

Note that

is computable since all the three arguments are known. Provided the equations are linearly independent, C_(l) and C_(h) may be determined. It is possible that ∈_(lr)=∈_(hr) and ∈_(lR)=∈_(hR). If so, only the sum C_(l)+C_(h) may be inferred, and the two equations have to be linearly dependent. In this unlikely case, during the calibration phase, it should be ensured that ∈_(lm)=∈_(hm) as well. Otherwise, l and h fractions at a molecular weight threshold should be distinguished so that ∈_(lr)≠∈_(hr) _(r) and ∈_(lR)≠∈_(hR).

It is not possible for concentrations to be negative. Thus, if either one is found to be less than 0, its value may be set to be zero, and an error flag may be set. Each equation above will produce two different values for the non-negative concentration. A suitable mean (e.g., arithmetic) value of the two will be used. For example, suppose that C_(l)<0 from Eqs. 53 and 54. C_(l)=0may be set. Each of the above equations then produces a value for C_(h), and these may be averaged in certain embodiments.

Once C_(l) and C_(h) are obtained from Eqs. 53 and 54, the measurement at mmay be used to get the concentration of the dissolved component from:

$\begin{matrix} {C_{c} = {\frac{1}{\epsilon_{em}}{\left( {\text{?} - {\epsilon_{lm}C_{l}} - \text{?}} \right).}}} & (55) \end{matrix}$ ?indicates text missing or illegible when filed

Note that C_(c)≥0. If not, C_(c)=0 may be set, and an error flag may be set.

Optimal Concentration Estimation

For reducing noise in the output, a single measurement at wavelength λ_(r) and λ_(R) may not be the best option. For example, detector and signal processing noise in the measurements, or fluctuations or variations in temperature between two crystals 42 may cause unwanted errors in C_(l), C_(h), and C_(c). It is desirable to increase the number of reference wavelengths and/or take several closely spaced measurements that are sufficiently well separated to be uncorrelated, but not so far apart to be influenced by changes in the stream of the fluid sample 44. As used herein, the term “optimal concentration” is intended to mean concentrations of the various components of the fluid sample 44 that minimize noise and other errors that are due to random fluctuations.

One method to process the data, and probably the easiest and fastest, is to infer η_(f) _(s) for each pair of first and second measurements at λ_(r) and λ_(R). Alternatively, if there are J sets having 3J measurements, η_(f) _(s) may be averaged and the mean value used. Under either case, η_(f) _(s) is obtained prior to solving for the concentrations.

Consider having J such measurements of A_(er1), A_(eR1), A_(em1), along with matched J results of η_(f) _(s) _(r), η_(f) _(s) _(R), and η_(f) _(s) _(m). Thus, there are 3J measurements, or J each of A_(er1), A_(eR1), A_(em1). For each of these J measurements, there is an inferred η_(f) _(s) . The unknowns are C_(l), C_(h), and C_(c).

for each of the 3J measurements is computed from

(η_(f) _(s) , η_(κ) ₁ , θ) for λ_(r), λ_(R), and λ_(m). Note that multiple measurements out of the J sets may have the same temperature and, for these, ∈_(lr)

, ∈_(hr)

are the same. The same is true for ∈_(lR)

, ∈_(hR)

, and ∈_(lm)

, ∈_(hm)

, and ∈_(cm)

, where

here is understood to be at the frequency associated with the attenuation coefficient. The coefficient matrix E consisting of these elements will be such that E^(T)E will be a 3×3 matrix. Then (E^(T)E)⁻¹E^(T) is the pseudoinverse and is a 3×3J matrix. The measurements will have random variations and, as stated before, it is a column matrix A of 3J elements. The least square result for the column matrix C with elements C_(l), C_(h), and C_(c) is (E^(T)E)⁻¹E^(T)A. Explicitly, the matrix elements are:

$\begin{matrix} {E = \begin{bmatrix} \left( {\epsilon_{lr}\ell_{{sr}1}} \right)_{,1} & \left( {\epsilon_{hr}\ell_{{sr}1}} \right)_{,1} & 0 \\ \left( {\epsilon_{lR}\ell_{{sR}1}} \right)_{,1} & \left( {\epsilon_{hR}\ell_{{sR}1}} \right)_{,1} & 0 \\ \left( {\epsilon_{lm}\ell_{{sm}1}} \right)_{,1} & \left( {\epsilon_{hm}\ell_{{sm}1}} \right)_{,1} & \left( {\epsilon_{em}\ell_{{sm}1}} \right)_{,1} \\  \vdots & \vdots & \vdots \\ \left( {\epsilon_{lr}\ell_{{sr}1}} \right)_{,J} & \left( {\epsilon_{hr}\ell_{{sr}1}} \right)_{,J} & 0 \\ \left( {\epsilon_{lR}\ell_{{sR}1}} \right)_{,J} & \left( {\epsilon_{hR}\ell_{{sR}1}} \right)_{,J} & 0 \\ \left( {\epsilon_{lm}\ell_{{sm}1}} \right)_{,J} & \left( {\epsilon_{hm}\ell_{{sm}1}} \right)_{,J} & \left( {\epsilon_{em}\ell_{{sm}1}} \right)_{,J} \end{bmatrix}} & (56) \end{matrix}$ $\begin{matrix} {C = \begin{bmatrix} C_{l} \\ C_{h} \\ C_{c} \end{bmatrix}} & (57) \end{matrix}$ $\begin{matrix} {A = {\begin{bmatrix} \left( A_{{er}1} \right)_{,1} \\ \left( A_{{eR}1} \right)_{,1} \\ \left( A_{{em}1} \right)_{,1} \\  \vdots \\ \left( A_{{er}1} \right)_{,J} \\ \left( A_{{eR}1} \right)_{,J} \\ \left( A_{{em}1} \right)_{,J} \end{bmatrix}.}} & (58) \end{matrix}$

The least squares solution when the same η_(f) _(s) is used for the entire set of J is:

$\begin{matrix} {C = \text{?}} & (59) \end{matrix}$ ?indicates text missing or illegible when filed

The averages of the J measurements are defined through:

$\begin{matrix} {{\overset{\_}{A}}_{{eR}1} = \frac{\left\lbrack {\left( A_{{eR}1} \right)_{,1} + \ldots + \left( A_{{eR}1} \right)_{,J}} \right\rbrack}{J}} & (60) \end{matrix}$ $\begin{matrix} {{\overset{\_}{A}}_{{er}1} = \frac{\left\lbrack {\left( A_{{er}1} \right)_{,1} + \ldots + \left( A_{{er}1} \right)_{,J}} \right\rbrack}{J}} & (61) \end{matrix}$ $\begin{matrix} {{\overset{\_}{A}}_{{em}1} = \frac{\left\lbrack {\left( A_{{em}1} \right)_{,1} + \ldots + \left( A_{{em}1} \right)_{,J}} \right\rbrack}{J}} & (62) \end{matrix}$

An alternative easily applied option for real-time answers would be to take average temperature of the 2J sets (from the two crystals), and compute η_(f) _(s) _(r), η_(f) _(s) _(R), and η_(f) _(s) _(m). The averages of A_(er1), A_(eR1), A_(em1) of the J sets may then be used in Eqs. 53, 54, and 55 to get C_(l), C_(h), and Cc. These provide an explicit best-fit solution from a set of J measurements comprising 3J attenuation data, and may also be applied on a rolling basis. When a J+1 set of three is added, set 1 is rolled off, and all sets are rolled up one level, and J+1 replaces J. This, then, provides a J-window moving average measurement.

In both of these cases, a moving set of J measurements, each consisting of 3 elements, may be used. The oldest set of points are rolled out of the dataset head to be replaced by a set of three new measurements at the tail end. J and Δt (time for J measurements to be completed is JΔt) may be chosen such that within JΔt, noticeable change in concentrations are unlikely, and Δt is large enough for the noise to be uncorrelated.

Eqs. 59 are based on J sets of measurements, for which a single value of η_(f) _(s) is used for a given wavelength. While the equations provide the least squares solution to this problem, and is the same as inverting average of the J absorbances, there is no guarantee that no element of C is negative. If the wavelengths are chosen for the ∈ matrix such that it is diagonally dominant, negative concentrations will be avoided. However, since light and heavy hydrocarbons are likely to have significant commonalities in the absorption spectrum, it is useful to have a method where only non-negative results are possible. Such a method may be a non-negative least squares algorithm. Although refinements to this algorithm are available, this algorithm is more than adequate. Alternatively, the non-negative least squares may be equivalent to a quadratic programming formulation of the form:

$\begin{matrix} {{{x:x} = {\arg\left\lbrack {\min\limits_{x_{i} \geq 0}\left( {{\frac{1}{2}x^{T}{Qx}} + {y^{T}x}} \right)} \right\rbrack}},} & (63) \end{matrix}$

where Q=E^(T)E and y=−E^(T)A. The two methods should produce the same results.

Background Radiation

Unlike infrared (IR) wavelengths, mid-IR wavelengths are such that, at the temperatures of interest, a non-negligible spectral radiance occurs at the wavelengths of interest, particularly 3 μm and above, even for temperatures as low as 323 K.

One method for subtracting background radiation is to use the measured temperature, compute the spectral radiance and intensity based on Planck black-body radiation, and subtract the emission intensity from the measurement. Since the characteristics of the sensor and the filters come into play to make this correction properly, a look-up value of intensities for a temperature range of interest may be used. These look-up values may be tabulated based on actual measurement with a fluid, but without a source. However, the emissivity of fluids may vary, and such a correction may be prone to vary from one fluid to the next, or even with composition for a given hydrocarbon solvent. With brines, this is less of an issue, because the solubility of CO₂ in brine is sufficiently small that brine emissivity does not change appreciably.

For a more easily applied correction for a fluid of unknown emissivity, an on-off method may be implemented, the steps of which may include:

-   -   The source is on. Signal measured is a combination of the         attenuate reflected intensity and the background. The measured         signal at wavelengths λ_(r), λ_(R), and λ_(m) for the solution         adjacent to the crystal 42 may be labeled S_(sr), S_(sR), and         S_(sm).     -   The source is off. Signal measured is the background. The         measured signal at wavelengths λ_(r), λ_(R), and λ_(m) for the         solution adjacent to the crystal 42 may be labeled Z_(sr),         Z_(sR), and Z_(sm).     -   Measurements used for calculating absorbances are         I_(sr)=S_(sr)−Z_(sr), I_(sR)=S_(SR)−Z_(sR), and         I_(sm)=S_(sm)−Z_(sm).     -   Background subtraction may be applied for both crystals one and         two.     -   Background subtraction may also be applied during calibration,         as discussed below.

Crystal

For calibration and inversion of the measured intensities in terms of concentration, the refractive index of crystals 42 should not only be known at the temperature at the face exposed to the fluid sample 44, but also at each of the measurement wavelengths, including the reference. Given that the crystals 42 are relatively incompressible in comparison to the fluid samples 44, pressure dependency is likely to be of negligible consequence. As an example, sapphire shows a strong dependency over the wavelengths of interest (e.g., 2-5 μm) as exhibited in FIG. 10 . The functionality is quadratic for η_(κ) ² at least at 20° C. As illustrated in FIG. 11 , η_(κ) ² is nearly linear with respect to λ² over the range of wavelengths illustrated. A more elaborate computation that includes both temperature and wavelength dependence results is illustrated in the plot of FIG. 12 . The temperature dependence is relatively weak compared to wavelength. The differences inη_(s) at 2 μm and 4 μm are important enough for a η_(f) measurement.

An alternative to sapphire is diamond, which has a higher refractive index and, therefore, allows for a smaller incidence angle for total internal reflection. FIG. 13 illustrates the square of diamond's refractive index with respect to the reciprocal of the square of the wavelength. In order to read the wavelength, the top axis shows the corresponding λ values. Unlike sapphire, diamond's refractive index increases with wavelength, and is quite linear with respect to 1λ².

The correlations, the results of which are illustrated in FIGS. 12 and 13 , allow inference of η_(κ) at any of the wavelengths and at the temperatures of interest. Thus, based on the procedures given for calibration in the next section, the values of ∈_(iβ) may be inferred for the range of temperatures of interest, and over the limited range of pressures.

Calibration

In certain embodiments, calibration may be performed with two components l and h, thus dealing with the commonly encountered case of dissolution of CO₂ in crude oil. In other embodiments, more components than 1 and h may be added, but each addition would require an extra wavelength that provides nearly independent information, and this is not always possible given that hydrocarbons may be dominated by C—H bonds. It is also known that, at a minimum, composition evolution in developed miscibility requires two components. Furthermore, when the crude oil is represented by light and heavy components, the sampled hydrocarbon fluid in a CO₂ enhanced oil recovery process may change in composition with respect to the proportion of components l, h, and c, and it is desirable to estimate these.

Based on the foregoing, the calibration process may focus on tabulating ∈_(lr), ∈_(hr), ∈_(lR), ∈_(hR), ∈_(lm), ∈_(hm), ∈_(cm) with respect to T and P. For aqueous media applications such as in aquifer storage of CO₂ or in beverage industry, the solvent does not need to be split up into l and h components; for such applications, the solvent may be represented by a single component and l may be understood to reflect the aqueous solvent within which CO₂ dissolves. Here, then, C_(h)=0.

The breakdown of a solvent into l and h fractions generally requires a cutoff. This may be based on the number of carbon atoms or molecular weight. The two are closely related since carbon is often the dominant contributor to molecular weight. Similar separation may be based on boiling point at a specified pressure. It may be preferable to use molecular weight as the criterion, since the concentrations of light and heavy components are known by simply measuring the mass density of the separated fractions at a given T and P.

In certain embodiments, the first step may be to take one of the fractions. Since only a very weak dependence of ∈ on pressure is expected, a mean pressure value may be considered. If accuracy is of paramount importance, then a grid of temperatures and pressures may be constructed, and at each (T, P) pair, ∈_(lr), ∈_(lR), and ∈_(lm) may be obtained. For this, an ATR measurement may be conducted with the source turned on, and source turned off so as to obtain I_(r), I_(R), and I_(m) after subtracting background radiation at each of the wavelengths. The background radiation may be checked against the measured temperature to see whether the relative magnitudes at λ_(r), λ_(R), and λ_(m) correspond to the independent temperature measurement. If not, the calibration for I₀ may be rechecked. Assuming that this step is satisfactory, from the I_(r), I_(R), and I_(m) values, applying Eq. 21, with C_(h) and C_(c) equal to zero, ∈_(lr), ∈_(lR), and ∈_(lm)are known. By repeating the process over the entire grid of (T, P), as densely as needed, functional variation of the attenuation coefficients may be obtained for the

component. For liquids, because these coefficients show negligible dependence on P, and are expected to have only small dependence on T, a least squares algorithm is likely to help alleviate concerns of experimental errors.

Repetition of the above procedure for component h enables generation of ∈_(hr), ∈_(hR), ∈_(hm) expressions with respect to T and P.

Verficcation for Compnents l and h

Next, the values or ∈_(lr), ∈_(lR), ∈_(lm), and ∈_(hr), ∈_(hR), ∈_(hm) may be verfified as adequate in inferring mixture composition of l and h. For this, masses W_(l) and W_(h) of the l and h components may be considered. With the molecular weights of the two components being M_(l) and M_(h), the number of moles of l and h in the mixture are:

$\begin{matrix} {{n_{I} = \frac{W_{l}}{M_{l}}};{n_{h} = {\frac{W_{h}}{M_{h}}.}}} & (64) \end{matrix}$

Starting with volumes V_(l) and V_(h) of the two components, since the final volume V_(lh)≠V_(l)+V_(h), an independent mixed volume measurement may be needed. The concentrations are

$\begin{matrix} {{C_{l} = \frac{n_{l}}{V_{lh}}};{C_{h} = {\frac{n_{h}}{V_{lh}}.}}} & (65) \end{matrix}$

Thus, an attenuation experiment with a constituted mixture should provide correct values for C_(l) and C_(h) when the calibrated values of ∈_(l) and ∈_(h) are used at the three wavelengths for the T and P of interest. Conversely, the measured intensities should correspond to:

$\begin{matrix} {{\frac{I_{r}}{I_{0r}} = \text{?}};{\frac{I_{R}}{I_{0R}} = \text{?}};{\frac{I_{m}}{I_{0m}} = \text{?}}} & (66) \end{matrix}$ ?indicates text missing or illegible when filed

where C_(l) and C_(h) are obtained from Eqs. 65.

Calibration for Component c

For component c, the matter is not quite as straightforward, since CO₂ may be in gas or liquid states or supercritical at the conditions of T and P. Even at 100%, at low pressures, attenuation may be negligible. In addition, pure CO₂ may have a very large attenuation at high pressures. Therefore, the system may combine measurements with equilibrated CO₂ in a solvent knowing the dissolved amount from thermodynamic data, and attenuation in gas-phase pure CO₂. It may also be necessary to vary the solvent, in certain situations. Whenever a solvent is used, pure solvent attenuation coefficient and the component concentrations in the mixture will be needed; the latter of which is known from thermodynamic solution data of CO₂ in the solvent. In this scenario, it may be useful to know η at least for a subset of the solutions or pure gas, for validation. The procedure with pure CO₂ and an aqueous solvent is illustrated herein. The method is equally applicable with other solvents. The solvent may be denoted with a subscript b. Thus, the concentration of the solvent for calibration is C_(b) and its attenuation coefficient is ∈_(b).

Based on attenuation experiments, a relatively rough scale for ∈_(c) is about 100 m² mol⁻¹. This number may be used only for obtaining an estimate of the expected magnitude of attenuations for experimental design, and may not be used otherwise. For example, setting a 10% attenuation with a 11 μm path length (each reflection with sapphire, at 70°, gives an effective path length of about 0.44 μm at 350 K, with an η_(f) of unity; at 75°, this drops to 0.32 μm), a minimum of approximately 2.29 MPa pressure at 298 K may be required. More appropriately, a concentration of 1053.6 mol m⁻³ may be needed to get ∈_(c). By conducting attenuation experiments at various pressures and temperatures with pure CO₂, ∈_(c) at wavelengths λ_(r), λ_(R), and λ_(m) at each T and P may be obtained from:

$\begin{matrix} {{\frac{I_{r}}{I_{0r}} = \text{?}};{\frac{I_{R}}{I_{0R}} = \text{?}};{\frac{I_{m}}{I_{0m}} = {\text{?}.}}} & (67) \end{matrix}$ ?indicates text missing or illegible when filed

The minimum pressure as per the above assumptions is shown in FIG. 14 with open circles. Below this pressure, attenuation may be insufficient. As examples, at 273 K, a pressure of approximately 2.03 MPa is needed, and at 373 K a pressure of approximately 3.03 MPa is required. Above these pressures, attenuation is sufficient to infer ∈_(c).

At relatively high pressures, attenuation in CO₂ may be too large and the sensor may be nearly saturated. The estimated ∈_(c). with a saturated sensor will have an unacceptable error. Since ∈_(c). is expected to have only very small variability with respect to P, we may choose to use the low pressure values as an approximation. An alternative is to consider high pressure CO₂ at vapor, gas and supercritical conditions. The calculations in FIG. 14 show the maximum pressure above which a liquid forms; at this transition, the sensor is oversaturated. The transition to liquid occurs below the critical temperature shown by a vertical dashed line. The solid circles otherwise show the maximum pressure above which attenuation is sufficiently strong to lose sensitivity to concentration. Thus, the approximate range of recommended pressures for calibration is the band between open and solid circles. If it is found that ∈_(c) dependence on P is insignificant, pure CO₂ based calibration is sufficient.

If, for a certain range of temperature, it is found that ∈_(c) dependence on P is relevant enough to be taken into account, an alternative would be to use attenuation measurements with dissolved CO₂ and thermodynamic data for calibration. The simplest of solvents to consider would be brine or water, the latter being preferable since solubility of CO₂ decreases with salt concentration. Using 1000 kg m⁻³ as the approximate density of water over the range of T and P of interest, and a 3 μm effective path length (for η_(f)=1.325 and T=350 K, at an angle of 75°, per reflection effective length is about 0.89 μm; at 70°, this increases to 1.29 μm), an attenuation range of 0.1-0.9 may be set for estimating ∈_(c). These lower and upper values gives ∈_(c)C_(c)

=0.10536 and 2.3026. For purposes of determining approximate bounds for minimum and maximum pressure, attenuation may be neglected due to solvent. Then, with

=3 μm and ∈_(c)=100 m² mol⁻¹, a molality of CO₂ between 0.3512 and 7.6533 in mol kg⁻¹ is calculated.

Based on thermodynamics based correlations for standard chemical potentials for CO₂ in water, fugacity coefficients, and the vapor pressure of water, molality of CO₂ in an aqueous solvent may be computed reasonably well for P and T ranges of interest. Calculated solubilities from these correlations are shown for different temperatures within a range of interest in FIG. 15 . Since the equilibrated dissolved CO₂ is known to be dominated by species of CO₂ in liquid form, it may be used to set the range of pressures for which the attenuation is expected to be in the region of appreciable sensitivity. The minimum pressure required for molality to be 0.3512 mol kg⁻¹ has been computed. The maximum pressure allowable is the transition to liquid below the critical temperature, since the thermodynamic model assumes vapor phase for CO₂. Above critical temperature of CO₂, the maximum pressure exceeds 20 MPa, and is not of concern. The minimum pressure of CO₂ required for calibration with a pure water solution has been added to the FIG. 14 result, and the combined plot is shown in FIG. 16 .

FIG. 17 is a flow diagram of a method 72 for determining a refractive index of a formation fluid (e.g., the fluid sample 44 discussed with respect to FIG. 2 ). In certain embodiments, the method 72 includes placing into a borehole 12 a downhole tool 10 having a fluid admitting assembly 24, a flow line 30, two different crystals 42 in contact with the formation fluid 44 in the flow line 30, at least one light source 46, at least one light detector 52 and associated signal processing circuitry 54, and at least one processor 68, wherein the crystals 42 have at least one of different refractive indices and different angles of incidence (block 74). In addition, in certain embodiments, the method 72 includes moving the fluid admitting assembly 24 of the downhole tool 10 into contact with a formation 14 at a location of interest in the formation 14 (block 76). In addition, in certain embodiments, the method 72 includes causing formation fluid 44 to flow into the flow line 30 of the downhole tool 10 and into contact with the crystals 42 (block 78). In addition, in certain embodiments, the method 72 includes directing light from the at least one light source 46 into the crystals 42 (block 80). In addition, in certain embodiments, the method 72 includes detecting with the at least one light detector 52 the light exiting the crystals 42, wherein the crystals 42 and the at least one light source 46 are configured such that the light will undergo total internal reflection at interfaces between the crystals 42 and the formation fluid 44 (block 82). In addition, in certain embodiments, the method 72 includes using the associated signal processing circuitry 54 to compare the exiting light to an unattenuated (or reference) light value for the at least one light source 46 associated with the at least one detector 52 in order to obtain attenuation values (block 84). In addition, in certain embodiments, the method 72 includes using the at least one processor 68 to continuously and iteratively, in substantially real-time, determine attenuations of the light entering the crystals 42, and determine the refractive index of the formation fluid 44 and a carbon dioxide concentration in the formation fluid 44 utilizing the attenuations to account for variations in the refractive index of the formation fluid 44 (block 86).

As described above, in certain embodiments, once the at least one processor 68 determines the refractive index of the formation fluid 44 and the carbon dioxide concentration in the formation fluid 44, the at least one processor 68 may send control signals (e.g., via the communications interface 60) to the control systems 18, 22 illustrated in FIG. 1 to cause the control systems 18, 22 to control certain surface and/or downhole equipment to, for example, adjust component compositions of fluids that might be injected into the borehole 12 based at least in part on the determined refractive index of the formation fluid 44 and carbon dioxide concentration in the formation fluid 44.

The embodiments of the present disclosure include, but are not limited to:

-   -   A two crystal based attenuated total reflection measurement at         more than one reference wavelength and an attenuation wavelength         at which CO₂ attenuates an incident mid-IR beam.     -   A technique that takes into account the variation of refractive         index at the wavelengths of acquisition, for inferring the fluid         composition.     -   A normalization procedure for all sensors with a reference fluid         so that with the tuned gain, all source intensities at the         acquisition wavelengths appear the same to the detector.     -   A procedure that avoids background radiation correction through         direct on-off method.     -   A calibration method for inferring the molar attenuation         coefficients of the solvent components and the gas whose         dissolved concentration is desired.     -   Estimate of attenuation coefficient varying with temperature and         pressure.     -   An optimal component concentration estimate from a multitude of         attenuation measurements at two or more wavelengths.     -   An algorithm that continuously estimates moving average optimal         concentrations.

The specific embodiments described above have been illustrated by way of example, and it should be understood that these embodiments may be susceptible to various modifications and alternative forms. It should be further understood that the claims are not intended to be limited to the particular forms disclosed, but rather to cover all modifications, equivalents, and alternatives falling within the spirit and scope of this disclosure. 

1. A tool for determining a refractive index of a formation fluid, comprising: a body having a fluid admitting assembly and a flow line that receives the formation fluid; two different crystals having faces in contact with fluid in the flow line, wherein the crystals have at least one of different refractive indices and different angles of incidence; at least one light source coupled to the crystals and configured to direct light into the crystals, wherein the light has at least one wavelength, and wherein the wavelength, the refractive indices, and the angles of incidence are configured such that the light undergoes total internal reflection at interfaces between the crystals and the formation fluid; at least one light detector coupled to the crystals and configured to measure reflected light exiting the crystals; and at least one processor coupled to the at least one light detector, wherein the at least one processor is configured to continuously and iteratively, in substantially real-time: determine attenuations of the light entering the crystals; and determine the refractive index of the formation fluid and a carbon dioxide concentration in the formation fluid utilizing the attenuations to account for variations in the refractive index of the formation fluid.
 2. The tool of claim 1, wherein the at least one processor is configured to determine the refractive index of the formation fluid utilizing the attenuations to account for variations in penetration depth.
 3. The tool of claim 1, wherein the at least one processor is configured to determine the refractive index of the formation fluid at the temperature and pressure of the sampled fluid.
 4. The tool of claim 1, wherein the at least one processor is configured to determine the refractive index of the formation fluid correcting for background radiation.
 5. The tool of claim 1, wherein the at least one processor is configured to use a plurality of reference wavelengths to determine the refractive index of the formation fluid, wherein each reference wavelength of the plurality of reference wavelengths corresponds to a different attenuation coefficient of a component in the formation fluid.
 6. The tool of claim 1, wherein the at least one processor is configured to normalize the gain with respect to a reference fluid.
 7. The tool of claim 1, wherein the at least one processor is configured to estimate optimal concentrations of components in the formation fluid.
 8. The tool of claim 1, wherein the at least one processor is configured to verify light and heavy component concentrations in the formation fluid.
 9. The tool of claim 1, wherein the two different crystals comprise different materials.
 10. The tool of claim 1, wherein each of the crystals comprises diamond, sapphire, or zirconia.
 11. A method for determining a refractive index of a formation fluid, comprising: placing into a borehole a tool having a fluid admitting assembly, a flow line, two different crystals in contact with the formation fluid in the flow line, at least one light source, at least one light detector and associated signal processing circuitry, and at least one processor, wherein the crystals have at least one of different refractive indices and different angles of incidence; moving the fluid admitting assembly of the tool into contact with a formation at a location of interest in the formation; causing formation fluid to flow into the flow line of the tool and into contact with the crystals; directing light from the at least one light source into the crystals; detecting with the at least one light detector the light exiting the crystals, wherein the crystals and the at least one light source are configured such that the light will undergo total internal reflection at interfaces between the crystals and the formation fluid; using the associated signal processing circuitry to compare the exiting light to a reference light value for the at least one light source associated with the at least one detector in order to obtain attenuation values; and using the at least one processor to continuously and iteratively, in substantially real-time: determine attenuations of the light entering the crystals; determine the refractive index of the formation fluid; and determine a carbon dioxide concentration in the formation fluid utilizing the attenuations to account for variations in the refractive index of the formation fluid at measurement wavelengths and reference wavelengths.
 12. The method of claim 11, comprising using the at least one processor to determine the refractive index of the formation fluid utilizing the attenuations to account for variations in penetration depth.
 13. The method of claim 11, comprising using the at least one processor to determine the refractive index of the formation fluid at the fluid conditions of temperature and pressure.
 14. The method of claim 11, comprising using the at least one processor to determine the refractive index of the formation fluid correcting for background radiation.
 15. The method of claim 11, comprising using the at least one processor to use a plurality of reference wavelengths to determine the refractive index of the formation fluid, wherein each reference wavelength of the plurality of reference wavelengths corresponds to a different attenuation coefficient of a component in the formation fluid.
 16. The method of claim 11, comprising using the at least one processor to estimate optimal concentrations of components in the formation fluid.
 17. The method of claim 11, comprising using the at least one processor to verify light and heavy component concentrations in the formation fluid.
 18. The method of claim 11, wherein the two different crystals is composed of different materials.
 19. The method of claim 11, wherein each of the crystals is composed of diamond, sapphire, or zirconia.
 20. A tool for determining a refractive index of a formation fluid, comprising: two different crystals having faces in contact with fluid in a flow line, wherein the crystals have at least one of different refractive indices and different angles of incidence; at least one light source coupled to the crystals and configured to direct light into the crystals; at least one light detector coupled to the crystals and configured to measure reflected light exiting the crystals; and at least one processor coupled to the at least one light detector, wherein the at least one processor is configured to continuously and iteratively, in substantially real-time: determine attenuations of the light entering the crystals; and determine the refractive index of the formation fluid and a carbon dioxide concentration in the formation fluid utilizing the attenuations to account for variations in the refractive index of the formation fluid. 